﻿using System;
using System.Messaging;
using Castle.Core.Resource;
using Castle.Windsor;
using Castle.Windsor.Configuration.Interpreters;
using Castle.Windsor.Installer;
using NUnit.Framework;

namespace WindsorInitConfig {
    [TestFixture]
    public class MessageFormatter {
        [Test]
        public void tt() {
            var container = new WindsorContainer(new XmlInterpreter(new StaticContentResource(@"<castle>
<components>
<component id='formatter' 
service='System.Messaging.IMessageFormatter, System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 
type='WindsorInitConfig.MessageFormatter+DummyFormatter'/>
</components>
</castle>")));
            container.Resolve<IMessageFormatter>("formatter");
        }

        public class DummyFormatter : IMessageFormatter {
            public object Clone() {
                throw new NotImplementedException();
            }

            public bool CanRead(Message message) {
                throw new NotImplementedException();
            }

            public object Read(Message message) {
                throw new NotImplementedException();
            }

            public void Write(Message message, object obj) {
                throw new NotImplementedException();
            }
        }
    }
}